<%-- 
    Document   : security
    Created on : 08-nov-2008, 21:05:47
    Author     : org.@le

--%>

<%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@taglib uri="http://richfaces.org/rich" prefix="rich"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <c:if test="${sessionBean.ejbSession.owner==null}" >
            <jsp:forward page="../login.jsp" />
        </c:if>
        <c:if test="${!sessionBean.ejbSession.owner.adminUser}" >
            <jsp:forward page="../user/homeUser.jsp" />
        </c:if>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <f:view>
            <h:form>
                
                <h:panelGrid width="100%">
                    <rich:toolBar style="position:absolute; top: 10px; left: 10px" width="300px">
                        <a href="/site/faces/admin/admin.jsp" >Admin panel</a> > 
                        <h:outputText value="Manage users" />
                    </rich:toolBar>
                </h:panelGrid>
                <h1>Backup database</h1>
                <rich:panel style="width:200px; border:0px">
                    <div style="left:10px; position:absolute;" align="center">
                        <h:commandLink action="#{BackupBean.createBackup}" title="Backup database" style="border: 0px">
                            <img src="/site/images/backup.png" style="border: 0px">                            
                        </h:commandLink>    
                        <br>
                        <h:commandLink value="Backup database" action="#{BackupBean.createBackup}" />    
                    </div>
                </rich:panel>
                    <rich:panel style="border:0px">
                        <h:messages id="mal1" globalOnly="true" style="top:60px; position:relative; color:green"/>
                    </rich:panel>

            </h:form> 
        </f:view>
    </body>
</html>
